package com.kinggm.service.factory.abs;

import com.kinggm.service.factory.service.*;

import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;

public abstract class Pizza {
    public String name;
    public Sauce sauce;
    public Dough dough;
    public Cheese cheese;
    public Veggies[] veggies;
    public Clams clams;

    @Override
    public String toString() {
        Set<String> set = Arrays.stream(veggies).map(Veggies::getName).collect(Collectors.toSet());
        return "Pizza{" +
                "名称='" + name + '\'' +
                ", 酱汁=" + sauce.getName() +
                ", 面饼=" + dough.getName() +
                ", 奶酪=" + cheese.getName() +
                ", 蔬菜=" + set.toString() +
                ", 蛤蜊=" + clams.getName() +
                '}';
    }


    public abstract void prepare();


    void bake() {
        System.out.println("烘烤");

    }


    void cut(){
        System.out.println("切割");
    }


    void box(){
        System.out.println("打包");
    }








    public Sauce getSauce() {
        return sauce;
    }

    public void setSauce(Sauce sauce) {
        this.sauce = sauce;
    }

    public Dough getDough() {
        return dough;
    }

    public void setDough(Dough dough) {
        this.dough = dough;
    }

    public Cheese getCheese() {
        return cheese;
    }

    public void setCheese(Cheese cheese) {
        this.cheese = cheese;
    }

    public Veggies[] getVeggies() {
        return veggies;
    }

    public void setVeggies(Veggies[] veggies) {
        this.veggies = veggies;
    }

    public Clams getClams() {
        return clams;
    }

    public void setClams(Clams clams) {
        this.clams = clams;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
